const _ = require('lodash');

module.exports = function(db) {
  const collection = db.collection('statistics-10-minutes');
  const indexes = [{ key: { date: 1 }, name: 'date_1' }, { key: { createdAt: 1 }, name: 'createdAt_1' }];
  collection.createIndexes(indexes);

  return {
    name: 'statistics10Minutes',
    insertOne: function(action) {
      return collection.insertOne(action);
    },
  };
};
